//
//  ViewController.m
//  QQ聊天页面
//
//  Created by dllo on 16/7/21.
//  Copyright © 2016年 YMJ. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end
 
@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.263 green:0.396 blue:1.000 alpha:1.000];
    UISegmentedControl *segment = [[UISegmentedControl alloc] initWithItems:@[@"消息", @"电话"]];
    segment.frame = CGRectMake(0, 0, 130, 35);
    self.navigationItem.titleView = segment;
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"02 下午5.49.33"]];
    imageView.frame = CGRectMake(0, 0, 44, 44);
    imageView.layer.cornerRadius = 22;
    imageView.layer.masksToBounds = YES;
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:imageView];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:nil action:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
